package me.ezitku.base.extensions

import android.app.Activity
import android.graphics.Point
import androidx.fragment.app.Fragment

/**
 * Created by yurqi on 2017/6/28.
 */


/**
 * ئېكران كەڭلىك
 */
val Activity.displayWidth: Int
    get() {
        var display = windowManager.defaultDisplay
        var point = Point()
        display.getSize(point)
        return point.x
    }
val Fragment.displayWidth: Int
    get() = activity!!.displayWidth
/**
 * ئېكران ئېگىزلىكى
 */
val Activity.displayHeight: Int
    get() {
        var display = windowManager.defaultDisplay
        var point = Point()
        display.getSize(point)
        return point.y
    }

val Fragment.displayHeight: Int
    get() = activity!!.displayHeight
